//
//  UIViewController+SSAddition.m
//
//  Created by Esther on 2016/12/10.
//  Copyright © 2016年 Esther. All rights reserved.
//

#import "UIViewController+SSAddition.h"

@implementation UIViewController (SSAddition)

#pragma mark -
#pragma mark - 在当前视图控制器中添加子控制器，将子控制器的视图添加到 view 中
- (void)SSAddChildController:(UIViewController *)childController intoView:(UIView *)view  {
    
    [self addChildViewController:childController];
    
    [view addSubview:childController.view];
    
    [childController didMoveToParentViewController:self];
}

@end
